<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="erp" uri="/erp-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">
<link rel="stylesheet"
	href="<%=basePath%>script/jquery-ui-1.10.4/themes/base/jquery.ui.all.css">
<script src="<%=basePath%>script/jquery-ui-1.10.4/jquery-1.10.2.js"></script>
<script src="<%=basePath%>script/jquery-ui-1.10.4/ui/jquery.ui.core.js"></script>
<script
	src="<%=basePath%>script/jquery-ui-1.10.4/ui/jquery.ui.widget.js"></script>
<script
	src="<%=basePath%>script/jquery-ui-1.10.4/ui/jquery.ui.button.js"></script>
<script src="<%=basePath%>script/script.js"></script>
<link rel="stylesheet"
	href="<%=basePath%>script/jquery-ui-1.10.4/demos/demos.css">
<link rel="stylesheet" href="<%=basePath%>style/style.css">
<script>
	$(function() {
		init_list_page();
	});

	function gotoPage(pageIndex) {
		window.location.href = "forum_list.action?page.pageIndex=" + pageIndex;
	}
</script>
</head>
<body>
	<div class="center">
		<div class="list_container">
			<h1 class="catalogue">
				<s:a action="forum_list">版块列表</s:a>
			</h1>
			<erp:link url="forum_addPage" value="添加版块" attr="class:a_add_forum" />
			<table class="ui-widget ui-widget-content">
				<thead>
					<tr class="ui-widget-header ">
						<th>版块名称</th>
						<th>版块描述</th>
						<th>主题数</th>
						<th colspan="4">相关操作</th>
					</tr>
				</thead>
				<tbody>
					<s:iterator value="#request.forumList">
						<tr>
							<td><s:a action="topic_list?forum.id=%{id}">${name}</s:a></td>
							<td>${description}</td>
							<td>${topicCount}</td>
							<td><erp:link url="forum_delete" value="删除" params="id"
									attr="class:a_delete" /></td>
							<td><erp:link url="forum_editPage" value="修改" params="id"
									attr="class:a_edit_forum" /></td>
							<td><erp:link url="forum_moveUp" value="上移" params="id"
									attr="class:a_moveUp" /></td>
							<td><erp:link url="forum_moveDown" value="下移" params="id"
									attr="class:a_moveDown" /></td>
						</tr>
					</s:iterator>
				</tbody>
			</table>
			<!-- 分页信息 -->
			<br />
			<%@include file="/WEB-INF/jsp/public/pageController.jsp"%>
			<br /> <br />
		</div>
	</div>
</body>
</html>
